﻿using System;
using System.ComponentModel;

namespace Cashbook.ViewModels
{
	public class MonthStaticsVM : INotifyPropertyChanged
	{


		private int _month;

		public int Month
		{
			get
			{
				return _month;
			}
			set
			{
				this._month = value;
				OnPropertyChanged(nameof(Month));
			}
		}


		private int _amount;

		public int Amount
		{
			get
			{
				return _amount;
			}
			set
			{
				this._amount = value;
				OnPropertyChanged(nameof(Amount));
			}
		}

		private int _payedAmount;

		public int PayedAmount
		{
			get
			{
				return _payedAmount;
			}
			set
			{
				this._payedAmount = value;
				OnPropertyChanged(nameof(PayedAmount));
			}
		}


		
		public int UnpayedAmount
		{
			get
			{
				return Amount-PayedAmount;
			}
			
		}


		public event PropertyChangedEventHandler PropertyChanged;
		private void OnPropertyChanged(string propertyName)
		{
			this.PropertyChanged?.Invoke(this,
			  new PropertyChangedEventArgs(propertyName));
		}
	}
}
